package com.infoland.afanmall.model.my.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.infoland.afanmall.R;
import com.infoland.afanmall.base.util.StatusBarKit;
import com.infoland.afanmall.base.util.ToolsKit;
import com.infoland.afanmall.model.my.adapter.WlActvAdapter;
import com.infoland.afanmall.model.my.entity.WlActvEntity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 物流详细信息
 * Activity
 */
public class WuLiuInfoActivity extends AppCompatActivity {
    @BindView(R.id.actv_wl_txt2)
    TextView actvWlTxt2;
    @BindView(R.id.actv_wl_ll2)
    LinearLayout actvWlLl2;
    @BindView(R.id.actv_wl_recy)
    RecyclerView actvWlRecy;
    List<WlActvEntity> entityList;
    @BindView(R.id.title_layout)
    LinearLayout titleLayout;

    private int getLayout() {
        return R.layout.wu_liu_msg_activity;
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayout());
        ButterKnife.bind(this);
        StatusBarKit.immersiveBlackTitleText(this, titleLayout);
        initData();
    }


    private void initData() {
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getApplicationContext());
        actvWlRecy.setLayoutManager(linearLayoutManager);
        actvWlRecy.setAdapter(new WlActvAdapter(R.layout.item_wl_xx_msg, getData(), getApplicationContext()));


    }

    private List getData() {
        entityList = new ArrayList<>();
        entityList.add(new WlActvEntity());
        entityList.add(new WlActvEntity());
        entityList.add(new WlActvEntity());
        entityList.add(new WlActvEntity());
        return entityList;
    }
    @Override
    protected void onDestroy() {
        ToolsKit.deleteOKHttp(this);
        super.onDestroy();
    }
}
